package util.model;

import java.util.Map;
import java.util.Observable;
import java.util.Observer;

/**
 * Created by yzy on 2021-04-02 10:28
 */
public class ObservableReader implements Observer {

    @Override
    public void update(Observable o, Object arg) {
        ObservablePublisher publisher;
        if(o instanceof ObservablePublisher){
            publisher = (ObservablePublisher) o;
            Map<String, Object> data = publisher.getData();
            System.out.println(arg + "---" +data);
        }

    }
}
